package cn.edu.gzgs.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;

/**
 * 部门数据传输对象（用于新增、修改）
 *
 * @author Zyf
 * @since 2024-05-28
 */
@Data
@Schema(description = "部门新增/修改DTO")
public class DeptDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "部门ID，修改时需要", example = "1")
    private Long id;

    @Schema(description = "部门名称", required = true, example = "人工智能学院")
    @NotBlank(message = "部门名称不能为空")
    private String name;

    @Schema(description = "上级部门ID，顶级部门可为空", example = "0")
    private Long parentId;

    @Schema(description = "部门类型: 100-管理单位, 200-教学单位", required = true, example = "200")
    @NotNull(message = "部门类型不能为空")
    private Integer type;
} 